package com.zg.autoflow.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zg.autoflow.req.AutoflowMainAddReq;
import com.zg.autoflow.req.AutoflowMainIdReq;
import com.zg.autoflow.req.AutoflowMainPageReq;
import com.zg.autoflow.vo.AutoFlowMainLinkVo;
import com.zg.autoflow.vo.AutoflowMainPageVo;
import com.zg.autoflow.vo.AutoflowMainUpdateVo;
import com.zg.common.core.R;
import com.zg.common.core.dao.autoflow.entity.AutoflowMain;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
* @author zg
*/
public interface AutoflowMainService {
    /**
    * 新增
    * @param param
    * @return
    */
    AutoflowMain add(AutoflowMainAddReq param);

    /**
    * 删除
    * @param idList 实体ID列表
    */
    void del(List<Long> idList);

    /**
    * 更新
    * @param param
    * @return
    */
    AutoflowMain update(AutoflowMainUpdateVo param);


    IPage<AutoflowMainPageVo> page(Page<AutoflowMainPageVo> objectPage, AutoflowMainPageReq autoflowMainPageReq);

    void insetOrUpdateAutoFlow(String ID,MultipartFile file) throws Exception;

    void syncAutoFlow(Long flowId);

    String agreeAutoFlow(AutoflowMainIdReq param);

    String unagreeAutoFlow(AutoflowMainIdReq param);

    void exportFlowExcel(HttpServletResponse response, Long flowId) throws Exception;

    AutoFlowMainLinkVo getAutoFlowMainLink(Long flowId);
}
